﻿
    $(document).ready(function () {
        new AjaxUpload($('#upLoad1'), {
            action: '/Common/Upload?imgtype=3',
            onSubmit: function (file, ext) {

            },
            onComplete: function (file, response) {
                var returnStr = response.replace("<PRE>", "").replace("</PRE>", "").replace("<pre>", "").replace("</pre>", "");
             
                var str = returnStr.split('|');
                if (str[0] == "00") {
               
                    $("#PicField1").val(str[1].split('-')[1]);
                }
                else {
                    alert(str[1]);
                }
            }
        });
        new AjaxUpload($('#upLoad2'), {
            action: '/Common/Upload?imgtype=3',
            onSubmit: function (file, ext) {

            },
            onComplete: function (file, response) {
                var returnStr = response.replace("<PRE>", "").replace("</PRE>", "").replace("<pre>", "").replace("</pre>", "");
                var str = returnStr.split('|');
                if (str[0] == "00") {

                    $("#PicField2").val(str[1].split('-')[1]);
                }
                else {
                    alert(str[1]);
                }
            }
        });
        new AjaxUpload($('#upLoad3'), {
            action: '/Common/Upload?imgtype=3',
            onSubmit: function (file, ext) {

            },
            onComplete: function (file, response) {
                var returnStr = response.replace("<PRE>", "").replace("</PRE>", "").replace("<pre>", "").replace("</pre>", "");
                var str = returnStr.split('|');
                if (str[0] == "00") {

                    $("#PicField3").val(str[1].split('-')[1]);
                }
                else {
                    alert(str[1]);
                }
            }
        });
        new AjaxUpload($('#upLoad4'), {
            action: '/Common/Upload?imgtype=3',
            onSubmit: function (file, ext) {

            },
            onComplete: function (file, response) {
                var returnStr = response.replace("<PRE>", "").replace("</PRE>", "").replace("<pre>", "").replace("</pre>", "");
                var str = returnStr.split('|');
                if (str[0] == "00") {

                    $("#PicField4").val(str[1].split('-')[1]);
                }
                else {
                    alert(str[1]);
                }
            }
        });
        new AjaxUpload($('#upLoad5'), {
            action: '/Common/Upload?imgtype=3',
            onSubmit: function (file, ext) {

            },
            onComplete: function (file, response) {
                var returnStr = response.replace("<PRE>", "").replace("</PRE>", "").replace("<pre>", "").replace("</pre>", "");
                var str = returnStr.split('|');
                if (str[0] == "00") {

                    $("#PicField5").val(str[1].split('-')[1]);
                }
                else {
                    alert(str[1]);
                }
            }
        });
    });
    